package com.itboy.config;

public class DynamicPropertySource extends org.springframework.core.env.PropertySource<Object> {
    private final String key;
    private final String value;

    public DynamicPropertySource(String key, String value) {
        super("DynamicPropertySource");
        this.key = key;
        this.value = value;
    }

    @Override
    public Object getProperty(String name) {
        return (name.equals(key)) ? value : null;
    }
}
